#ifndef CALIBRATION_ROUTINES_H_
#define CALIBRATION_ROUTINES_H_

#include <stdbool.h>

typedef enum detect_orientation_return_t{
	DETECT_ORIENTATION_NOSE_UP = 0,
	DETECT_ORIENTATION_NOSE_DOWN,
	DETECT_ORIENTATION_LEFT_SIDE_DOWN,
	DETECT_ORIENTATION_RIGHT_SIDE_DOWN,
	DETECT_ORIENTATION_ON_BACK,
	DETECT_ORIENTATION_LEVEL,
	DETECT_ORIENTATION_ERROR
}detect_orientation_return;


bool sphere_fit_least_squares(const float x[], const float y[], const float z[],
			     unsigned int size, unsigned int max_iterations, float delta, float *sphere_x, float *sphere_y, float *sphere_z,
			     float *sphere_radius);
					 
detect_orientation_return detect_orientation(bool lenient_still_detection);  ///< true: Use more lenient still position detection
					 



#endif
